package Demo1;

class Base{
    public int a;
    public int b;
    public Base(){
        System.out.println("调用了父类的构造方法");
    }
}
class Derive extends Base{
    public Derive(){
        //super();  没有写，但会默认有
        System.out.println("调用了子类的构造方法");
    }
}
public class Test {
    public static void main(String[] args) {
        Derive derive1=new Derive();
    }
}
